package com.xuzimian.globaldemo.spring.core.jpa.proxy;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Import;

@ComponentScan(basePackages = {"com.xuzimian.globaldemo.spring.core.proxy"})
@Import(JpaRepostoryRegistrar.class)
public class SpringApp {

    public static void main(String[] args) {
        ApplicationContext applicationContext = new AnnotationConfigApplicationContext(SpringApp.class);
        JpaRepository repository = (JpaRepository) applicationContext.getBean("categoryRepository");
        repository.findById();
    }
}
